<?php
//encryption key for parameters to be passed between $_GET for applications
$s_encryptionKey = "\xc8\xd9\xb9\x06\xd9\xe8\xc9\xd2";
//application routing specifics
$s_appRequestVarName = 'appRequest';
$s_subAppRequestVarName = 'action';
//root class where the views and navigation will be
$s_rootFile = 'index.php';
//array of application details
/*
 * structure:
 * $arr_applications = array(
 * 			array(	
 * 				'app_ident'=> '',
 * 				'app_display_name'=> '',
 * 				'controller_class'=> '',
 * 				'controller_class_alias'=> '',
 * 				'css_style_sheets'=> array(),
 * 				'js_files'=> array(),
 *				'js_load_function'=> 'function();'
 * 			)
 * 		)
 * )
 * 
 * 
 * note:
 * for sub applications use the same array structure but 
 * just sub the controller_class attribute with the method name
 * and sub the controller_class_alias with anything once again
 */
$arr_fw_js_files = array(
	C_FW_frontendPackage. 'js/lib/LABjs-2.03/LAB.min.js', 
	C_FW_frontendPackage. 'js/lib/jquery/jquery-1.7.js',
	C_FW_frontendPackage. 'js/lib/jquery/jquery-ui-1.8.16.custom.min.js',
	C_FW_frontendPackage. 'js/lib/tinymce/jscripts/tiny_mce/tiny_mce.js',
	C_FW_frontendPackage. 'js/lib/tinymce/jscripts/tiny_mce/jquery.tinymce.js',
	C_FW_frontendPackage. 'js/lib/jquery/datatable/jquery.dataTables.min.js',
	C_FW_frontendPackage. 'js/fw/utilities/FormStyler.js',
	C_FW_frontendPackage. 'js/fw/application/static-vars.js',
	C_FW_frontendPackage. 'js/fw/application/application.js',
);

$arr_fw_css_files = array(
	C_FW_frontendPackage. 'design/style.css',
	C_FW_frontendPackage. 'design/css/smoothness/jquery-ui-1.8.16.custom.css',
	C_FW_frontendPackage. 'design/utilities/utilities-style.css'
);

$arr_applications = array(
	//login application
	array(
		'app_ident'=> 'Login',
		'app_display_name'=> 'Login',
		'controller_class'=> 'LoginController',
		'controller_class_alias'=> 'Login',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, C_FW_frontendPackage.'js/custom/custom-applications/ManageArticles-application.js'),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> true
	),
	
	//logout application
	array(
		'app_ident'=> 'Logout',
		'app_display_name'=> 'Logout',
		'controller_class'=> 'LoginController',
		'controller_class_alias'=> 'Logout',
		'action'=> 'doLogOut',
		'action_alias'=> 'doLogOutAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, C_FW_frontendPackage.'js/custom/custom-applications/ManageArticles-application.js'),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> false
	),
	//dashboard applications
	array(
		'app_ident'=> 'Dashboard',
		'app_display_name'=> 'Dashboard',
		'controller_class'=> 'DashboardController',
		'controller_class_alias'=> 'DashboardAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, C_FW_frontendPackage.'js/custom/custom-applications/ManageArticles-application.js'),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> false
	),
	
	//manage articles applications
	array(
		'app_ident'=> 'ManageArticles',
		'app_display_name'=> 'Manage Articles',
		'controller_class'=> 'ManageArticlesController',
		'controller_class_alias'=> 'ManageArticlesAlias',
		'action'=> 'start',
		'action_alias'=> 'startAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, C_FW_frontendPackage.'js/custom/custom-applications/ManageArticles-application.js'),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> false,
	),
	
	array(
		'app_ident'=> 'ViewArticles',
		'app_display_name'=> 'View Articles',
		'controller_class'=> 'ManageArticlesController',
		'controller_class_alias'=> 'viewArticlesAlias',
		'action'=> 'viewArticles',
		'action_alias'=> 'viewArticlesMethodAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, C_FW_frontendPackage.'js/custom/custom-applications/ManageArticles-application.js'),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'UpdateArticle',
		'app_display_name'=> 'update article',
		'controller_class'=> 'ManageArticlesController',
		'controller_class_alias'=> 'updateArticleAlias',
		'action'=> 'updateArticle',
		'action_alias'=> 'updateArticleMethodAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, C_FW_frontendPackage.'js/custom/custom-applications/ManageArticles-application.js'),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'AddArticle',
		'app_display_name'=> 'Add Article',
		'controller_class'=> 'ManageArticlesController',
		'controller_class_alias'=> 'addArticleAlias',
		'action'=> 'addArticle',
		'action_alias'=> 'addArticleMethodAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, C_FW_frontendPackage.'js/custom/custom-applications/ManageArticles-application.js'),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'DeleteArticle',
		'app_display_name'=> 'Delete Article',
		'controller_class'=> 'ManageArticlesController',
		'controller_class_alias'=> 'deleteArticleTest',
		'action'=> 'deleteArticle',
		'action_alias'=> 'deleteArticleMethodAlias',
		'hidden'=> true
	)
	
);

